package com.foocus.foocuscloud.coustomer.order.controller;

import com.foocus.foocuscloud.common.domain.ResponseWrapper;
import com.foocus.foocuscloud.coustomer.api.BaseUserRestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/order")
public class OrderController {
    private static final Logger LOGGER = LoggerFactory.getLogger(OrderController.class);

    @Autowired
    private BaseUserRestService baseUserRestService;

    @GetMapping("/getOrderInfo")
    @ResponseBody
    public ResponseWrapper getOrderInfo(@RequestParam("userId") String userId) {

        ResponseWrapper wrapper = baseUserRestService.getLoginUser(userId);
        LOGGER.info("远程调用结果：{}", wrapper.toString());
        return wrapper;
    }
}
